<template>
	<view class="container">
		<view class="header">
			<view class="title">
				{{detail.title}}
			</view>
			<view class="sub-title">
				作者：{{detail.username}}&nbsp;
				来源：{{detail.department}}<br />
				发布时间：{{detail.createTime}}
			</view>
		</view>
		<view class="content">
			{{detail.content}}
		</view>
	</view>
</template>

<script setup>
	import {
		onLoad
	} from "@dcloudio/uni-app"
	import {
		ref
	} from "vue"

	const detail = ref();

	onLoad((e) => {
		detail.value = JSON.parse(e.detail);
	});
</script>

<style lang="scss" scoped>
	.container {
		padding: 20rpx;
		width: 100%;

		.header {
			text-align: center;

			.title {
				font-size: 36rpx;
				line-height: 80rpx;
			}

			.sub-title {
				margin-bottom: 20rpx;
				font-size: 24rpx;
				color: #666;
			}
		}

		.content {
			font-size: 28rpx;
			line-height: 40rpx;
			text-indent: 2ch;
			white-space: pre-wrap;
			word-break: break-all;
			text-align: justify;
		}
	}
</style>
